package com.lz.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import lombok.Data;

/**信用卡类
 * @author 徐建林
 * @date 2018/10/21 14:11
 */
@Table
@Entity
@Data
public class CreditCard implements Serializable{
    /**
	 * 
	 */
	private static final long serialVersionUID = 2534971706999324118L;
	@Id
    @GeneratedValue(generator = "native")
    @GenericGenerator(name = "native",strategy = "native")
//	信用卡主键
	private Integer creditcId;
    /**信用卡卡号*/
    private String creditCardId;
    /**所属银行的id*/
    private Integer bankId;
    /**信用额度*/
    private Double quota;
    /**已经使用额度*/
    private Double usedQuota;
    /**还款方式*/
    private String repaymentMethod;
    //银行卡对应的用户
    @ManyToOne(targetEntity=Customer.class)
    @JoinColumn(name="customerId")
    private Customer customer;

}
